﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace App.DbContexts
{

    [Table("Share")]
    public class ShareEntity : BaseEntity
    {
        [Required]
        public string Code { get; set; }

        [Required]
        public string Name { get; set; }

        /// <summary>
        /// 组别ID（类似板块）
        /// </summary>
        public int? GroupId { get; set; }

        /// <summary>
        /// 一周均价
        /// </summary>
        public double _7dayPrice { get; set; }

        public double _30dayPrice { get; set; }

        public double _60dayPrice { get; set; }

        public double _90dayPrice { get; set; }

        public TrendType Trend { get; set; }

        public string Suggest { get; set; }

        /// <summary>
        /// 今天
        /// 2022-05-30
        /// 类似这种
        /// </summary>
        public string Today
        { get; set; }

        /// <summary>
        /// 今天现价
        /// </summary>
        public double TodayPrice { get; set; }

        /// <summary>
        /// 今日开盘价
        /// </summary>
        public double TodayBeginPrice { get; set; }

        /// <summary>
        /// 昨日收盘价
        /// </summary>
        public double YesTodayEndPrice { get; set; }

        /// <summary>
        /// 今天最高
        /// </summary>
        public double TodayHeightPrice { get; set; }

        /// <summary>
        /// 今天最低
        /// </summary>
        public double TodayLowPrice { get; set; }

    }

    /// <summary>
    /// 走势
    /// </summary>
    public enum TrendType
    {
        趋势上涨 = 1,
        趋势下跌 = 2,
        平缓 = 3,
        难以评估 = 4,
    }

}
